﻿using System;
using System.Threading.Tasks;
using Avalonia.Controls;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using UI.Views;

namespace UI.ViewModels;

public partial class LoginViewModel : ViewModelBase
{
    
    [ObservableProperty]
    private bool _isLoggingIn;

    public bool IsLoggin
    {
        get => IsLoggingIn;
        set
        {
            IsLoggingIn = value;
            OnPropertyChanged(); // 实现 INotifyPropertyChanged
        }
    }
    
    public void LoginCommand(Window loginWindow)
    {
        var mainWindow = new MainWindow();
        mainWindow.Show();
        
    }
    
}